package com.example.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

/**
 * Created by lijingyu on 2018/5/29.
 */
@RestController
@RequestMapping("/hello")
public class HelloController {

    @Autowired
    private GirlProperties girlProperties;

    @RequestMapping(value = "/say/{id}", method = RequestMethod.GET)
    public String say(@PathVariable(value="id") Integer myId) {
        return "id:" + myId;
//        return girlProperties.getCupSize();
    }

    @GetMapping(value = "/hi")
    public String hi(@RequestParam(value = "id", required = false, defaultValue = "0") Integer myId) {
        return "id:" + myId;
//        return girlProperties.getCupSize();
    }


}
